AI agent instruction updates#13335
Conversation
| - Functions/variables: `snake_case` → `handle_request()`, `server_port`, `cache_key` | ||
| - Constants/macros: `UPPER_CASE` → `HTTP_STATUS_OK`, `MAX_BUFFER_SIZE` | ||
| - Member variables: `snake_case` with no prefix → `connection_count`, `buffer_size` | ||
| - Private member variables: `snake_case` with `m_` prefix → `m_was_modified` |
There was a problem hiding this comment.
I did a quick check and it looks like the leading underscore _foo style is the most common in the existing code. About 71% of private member variables. Could we keep using that?
There was a problem hiding this comment.
It is sadly common, but generally not advised because of possible conflicts with other internal variables. m_ is the typical pattern, and is also not uncommon in our codebase. We're really better off with m_ prefixes for new variables.
There was a problem hiding this comment.
For instance:
https://stackoverflow.com/a/20496955/629530
There was a problem hiding this comment.
FWIW, I was following _ prefix rule because it's written in here to do so.
https://cwiki.apache.org/confluence/display/TS/Coding+Style#CodingStyle-MemberVariables
Probably, it's time to discuss this bike-shedding :)
A few tweaks for guiding AI agents.
7828aaf to
11fbce8
Compare
A few tweaks for guiding AI agents.
Undraft this after @moonchen 's similar updates land and this is merged with those changes:
#13306